package com.studykun.client.util;

import java.util.List;

import com.google.gwt.user.client.Random;

public class ListExtra {
  public static <T> T randomFrom(
      final List<T> list) {
    if (list.size() == 0) {
      return null;
    }
    
    return list.get(Random.nextInt(list.size()));
  }
}
